Serial Transport Profile
- Encoding: UTF-8
- One request in flight per connection/session
Frame format:
+----------------------+-------------------+-------------------+
| Length (4 bytes, BE) | Payload (N bytes) | CRC16 (2 bytes,BE)|
+----------------------+-------------------+-------------------+
Rules:
Lengthis payload size in bytes, unsigned big-endian.CRC16is calculated overLength || Payload.- CRC algorithm: CRC16-IBM (
0x8005, initial0x0000). - No extra transport ACK/NACK layer is defined.
- Frames with CRC mismatch must be discarded.
Request payload format:
- Without body:
:<port><route> - With body:
:<port><route>\n<json>
:<port> is a mandatory prefix that selects the target service. For PalmPay use default :8887.
Examples:
:8887/check_connection
:8887/showqrcode
{"pay_id":"ORDER-1001","amount":12500,"currency":"USD","currency_name":"USD","pay_system":"miaPos"}
Response payload is always the standard JSON response envelope.
Authentication is not required on the serial channel.